{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pymongo import MongoClient\n",
    "import pprint"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "MONGO_CLIENT_ADDRESS = \"mongodb://localhost:27017/\"\n",
    "MONGO_DATABASE = \"prediction_service\"\n",
    "REPORT_COLLECTION = \"report\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "client = MongoClient()\n",
    "collection = client.get_database(MONGO_DATABASE).get_collection(REPORT_COLLECTION)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9\n"
     ]
    }
   ],
   "source": [
    "for col in collection.find():\n",
    "    pprint.pprint(len(col['data_drift']['data']['metrics'].keys()))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.2 ('prefect-monitoring-vrjQsnUO')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "8c4128a542e647ac345fb470a121f5ad37749126bd51dd0e4b0f94b08087470c"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
